// wigets/business/video-goods/index.js
import {util,api} from '../../../js/util';
import authorize from '../../../js/modules/authorize.js'
const componentBehavior = require('../../../js/common/ComponentBehavior')

const app = getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    display:{
      type: Boolean,
      value: false
    },
    goodsList:{
      type:Array,
      value:[]
    },
    // Currency:String
  },

  /**
   * 组件的初始数据
   */
  data: {
    imgDomain: api.imgDomain,
    Currency:api.Currency || '￥',//货币符号
  },

  behaviors: [componentBehavior],

  /**
   * 组件的方法列表
   */
  methods: {
    btnClose:function(){
      this.setData({display:false})
    },
    /**
    * 商品详情
    */
    bindDetail:function(e){
      var id = e.currentTarget.dataset.id;
      var userid = authorize.getEntity().proprietorId;
      wx.navigateTo({
        url: '/packageStore/pages/product/detail/detail?ptype=0&id='+id+'&sid='+userid+'&productId='+id,
      })
    },
  }
})